package com.hm.ibsm.auto.handler;

import io.grpc.CallOptions;
import io.grpc.Channel;
import io.grpc.ClientCall;
import io.grpc.ClientInterceptor;
import io.grpc.MethodDescriptor;
import lombok.extern.slf4j.Slf4j;

/**
 * @author shishun.wang
 * @date 2017年2月21日 下午4:43:47
 * @version 1.0
 * @describe
 */
@Slf4j
public class GrpcClientInterceptor implements ClientInterceptor {

	@Override
	public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) {
		log.info(method.getFullMethodName());
		return next.newCall(method, callOptions);
	}

}
